package com.example.aicloud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.aicloud.entity.Discuss;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * (Discuss)表数据库访问层
 *
 * @author makejava
 * @since 2024-07-14 20:08:14
 */
public interface DiscussMapper extends BaseMapper<Discuss> {
    @Update("update discuss set readcount=readcount+1 where did=#{did}")
    int updateReadCount(@RequestParam("did") Long did);


    @Update("update discuss set supportcount=supportcount+1 where did=#{did}")
    int updateSupportCount(@RequestParam("did") Long did);
}

